package com.mxx.common.netty.ws;

import com.mxx.common.netty.annotation.Websocket;

import java.lang.reflect.InvocationTargetException;

/**
 * @Auther: Mr. Zeng
 * @Date: 2020/8/4 17:01
 * @Description: 暂无描述
 */
public class NettWebsocketMethod {
    private Websocket websocket;
    private java.lang.reflect.Method method;
    private Object source;

    public NettWebsocketMethod(Websocket websocket, Object source, java.lang.reflect.Method method) {
        this.websocket = websocket;
        this.method = method;
        this.source = source;
    }

    public void invoke(NettyWebsocketRequest request, NettyWebsocketMessage message) throws InvocationTargetException, IllegalAccessException {
        this.method.invoke(source, request, message);
    }
}
